/*  
 *  Copyright 2006 Paul Jack.
 *
 *  This file is part of the Dex compiler suite. 
 *  
 *  Dex is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation; either version 2 of the License, or (at your
 *  option) any later version.
 *  
 *  Dex is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 *  Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 */
package dex.compiler.checker;

import dex.compiler.problem.Crime;
import dex.compiler.problem.Disagreement;


/**
 * Problems that can occur when checking statements.
 */
final public class StatementProblems {


	/**
	 * Static enum-like class.  Do not instantiate.
	 */
	private StatementProblems() {
	}


	final public static Disagreement BAD_ASSIGNMENT = 
	 new Disagreement("Can't assign ");
	
	final public static Disagreement BAD_INITIALIZER =
	 new Disagreement("Can't assign ");
	
	final public static Crime LOCAL_DUPE =
	 new Crime("Local already exists: ");
	
	final public static Crime BAD_LOCAL =
	 new Crime("Can't qualify local names.");
	
	final public static Crime BAD_DECREMENT = 
	 new Crime("Can't apply -- to non-integer type: ");

	final public static Crime BAD_INCREMENT = 
	 new Crime("Can't apply ++ to non-integer type: ");

	final public static Crime BAD_IF =
	 new Crime("If condition must be boolean, not ");

	final public static Crime BAD_CASE = 
	 new Crime("Switch cases must be integers, not ");

	final public static Crime BAD_SWITCH =
	 new Crime("Switch test must be an integer, not ");
	
	final public static Crime BAD_THROW = 
	 new Crime("Thrown object must be a ball, not ");

	final public static Crime BAD_CATCH = 
	 new Crime("Caught object must be a ball, not ");

	final public static Crime BAD_CATCH_NAME = 
	 new Crime("Can't qualify local variable name.");

	final public static Crime BAD_WHILE = 
	 new Crime("Condition must be boolean, not ");

	final public static Crime BAD_FOR = 
	 new Crime("Condition must be boolean, not ");

	final public static Disagreement BAD_RETURN =
	 new Disagreement("Invalid return type. Can't convert");

	final public static Crime UNREACHABLE = 
	 new Crime("Statement not reached.");

}
